<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>
	Using AquosDriver
</title>

<link rel="stylesheet" href="_CodeDoc.css" />

<style type="text/css">
.Reference
{
	color: #003399;
}
</style>

</head>

<body id="DocBrowserTopic">

<div class="TopicHeader">
	<div class="Supertitle_">
		HomeUX Driver Collection
	</div>
	Using AquosDriver
</div>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<div class="Summary">

<p>This page documents how to use <b>AquosDriver</b> (in AquosDriver.dll), the HomeUX-compatible
driver that controls a Sharp Aquos LC-52D65U, LC-42D65U, or LC-46D65U LCD TV connected via a serial
port.  <b>AquosSimulator</b> (in AquosSimulator.dll) is also documented here.</p>

<p>Page contents:</p>
<ul>
	<li><a href="#Overview">Hardware &amp; Driver Overview</a></li>
	<li><a href="#Config">Configuring AquosDriver</a></li>
	<li><a href="#Use">Using AquosDriver</a></li>
	<li><a href="#Sim">AquosSimulator</a></li>
</ul>

</div>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<div class="SectionHeader">
	Hardware &amp; Driver Overview<a name="Overview"></a>
</div>
<div id="DocTopic">
<div class="Section">

	<p>A <a href="http://www.sharpusa.com/">Sharp</a> Aquos LC-52D65U, LC-42D65U, or LC-46D65U
	TV&mdash;abbreviated "Aquos" in this documentation&mdash;is a TV with multiple HDMI inputs.</p>

	<p>AquosDriver allows a HomeUX installation to control a subset of the functionality of an
	Aquos TV:</p>
	<ul>

		<li>Inputs are assigned names, and you can select which input to view using its name.</li>

		<li>The volume and mute setting can be controlled.</li>

		<li>The TV can be powered on and off.</li>

	</ul>

</div>
</div>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<div class="SectionHeader">
	Configuring AquosDriver<a name="Config"></a>
</div>
<div id="DocTopic">
<div class="Section">

	<p>AquosDriver is configured in the HomeUX configuration file.  Here's the general
	structure (simplified):</p>

	<table class="Grid Code">
		<col class="Column1_" />
		<tr class="Header_">
			<td class="Header1_">XML</td>
		</tr>
		<tr>
			<td class="Content_ Indent_">
				&lt;configuration&gt;
					<div>&lt;HomeUXSettings&gt;
						<div><a href="#Device">&lt;Device Driver="AquosDriver.dll"&gt;</a>
							<div><a href="#Input">&lt;Input/&gt;</a>*</div>
						</div>
						<div>&lt;/Device&gt;</div>
					</div>
					<div>&lt;/HomeUXSettings&gt;</div>
				&lt;/configuration&gt;
			</td>
		</tr>
	</table>

	<p>"<tt>*</tt>" means "zero or more allowed".  Children of <tt>&lt;Device
	Driver="AquosDriver.dll"&gt;</tt> can appear in any order.</p>

	<p>Example:</p>

	<table class="Grid Code">
		<col class="Column1_" />
		<tr class="Header_">
			<td class="Header1_">XML</td>
		</tr>
		<tr>
			<td class="Content_">
	<pre>
&lt;configuration&gt;
  ...
  &lt;HomeUXSettings&gt;
    ...

    &lt;Device Name="Aquos" Driver="AquosDriver.dll"
          sim:SerialPort="AquosSimulator.dll;;Test=0"
          real:SerialPort="COM5,9600,8,n,1"&gt;

      &lt;Input Name="TiVo"    InputId="2" /&gt;
      &lt;Input Name="PC"      InputId="4" /&gt;
      &lt;Input Name="Xbox"    InputId="6" /&gt;

    &lt;/Device&gt;

  ...
  &lt;/HomeUXSettings&gt;
&lt;/configuration&gt;
	</pre>
			</td>
		</tr>
	</table>

	<p>The following subsections describe the AquosDriver configuration file XML elements.</p>

	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
	<div class="SubsectionHeader Reference">
		&lt;Device Driver="AquosDriver.dll"&gt;<a name="Device"></a>
	</div>
	<div class="Section">

		<p>(Required, used within <tt>&lt;HomeUXSettings&gt;</tt>.) Specifies an instance of
		AquosDriver, which is used to control an Aquos TV.</p>

		<div class="SubsectionHeader">Syntax</div>
		<table class="Grid Code">
			<col class="Column1_" />
			<tr class="Header_">
				<td class="Header1_">XML</td>
			</tr>
			<tr>
				<td class="Content_ Indent_">
					&lt;Device
						<div>Name="..."</div>
						<div>Driver="AquosDriver.dll"</div>
						<div>SerialPort="..."&gt;</div>
						<div><a href="#Input">&lt;Input/&gt;</a>*</div>
					&lt;/Device&gt;
				</td>
			</tr>
		</table>

		<p>"<tt>*</tt>" means "zero or more allowed".</p>

		<div class="SubsectionHeader">Attributes</div>
		<div class="Subsection">

			<div class="Subsection">
			<p class="AttributeName">Name</p>
			<p class="AttributeDescription">(String, required.)
				The name you assign to the device.
			</p>
			</div>

			<div class="Subsection">
			<p class="AttributeName">Driver</p>
			<p class="AttributeDescription">(String, required.)
				Must be "<tt>AquosDriver.dll</tt>".
			</p>
			</div>

			<div class="Subsection">
			<p class="AttributeName">SerialPort</p>
			<p class="AttributeDescription">(String, required.)
				A standard HomeUX serial port specification.  Identifies the serial port (real or
				virtual) that the hardware is connected to.  When connected to a real serial port,
				the parameters should be "<i>port-name</i>,9600,8,n,1" in order to correctly
				operate an Aquos unit.
			</p>
			</div>

		</div>

	</div>

	<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
	<div class="SubsectionHeader Reference">
		&lt;Input&gt;<a name="Input"></a>
	</div>
	<div class="Section">

		<p>(Zero or more, used within <a href="#Device">&lt;Device
			Driver="AquosDriver.dll"&gt;</a>.)
		Specifies one input on the Aquos TV.</p>

		<div class="SubsectionHeader">Syntax</div>
		<table class="Grid Code">
			<col class="Column1_" />
			<tr class="Header_">
				<td class="Header1_">XML</td>
			</tr>
			<tr>
				<td class="Content_ Indent_">
					&lt;Input
						<div>Name="..."</div>
						<div>InputId="..."</div>
					/&gt;
				</td>
			</tr>
		</table>

		<div class="SubsectionHeader">Attributes</div>
		<div class="Subsection">

			<div class="Subsection">
			<p class="AttributeName">Name</p>
			<p class="AttributeDescription">(String, required.)
				The name you assign to the input.  This typically describes the equipment connected
				to the input.
			</p>
			</div>

			<div class="Subsection">
			<p class="AttributeName">InputId</p>
			<p class="AttributeDescription">(Integer, required.)
				The input number on the TV.
			</p>
			</div>

		</div>

	</div>

</div>
</div>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<div class="SectionHeader">
	Using AquosDriver<a name="Use"></a>
</div>
<div id="DocTopic">
<div class="Section">

	<p>AquosDriver implements the following SyncPath schema:</p>
	<ul>

		<li><b><tt><i>device-name</i>\IsPowered</tt></b><br/>
			Gets or sets the power setting of the TV (<tt>true</tt> = "on", <tt>false</tt> =
			"off").</li>

		<li><b><tt><i>device-name</i>\Input</tt></b><br/>
			Gets or sets the name of the input displayed on the TV.</li>

		<li><b><tt><i>device-name</i>\Volume</tt></b><br/>
			Gets or sets the volume of output <i>output-name</i> of device <i>device-name</i>,
			between 0.0 and 1.0, inclusive.  1.0 corresponds to maximum volume.</li>

		<li><b><tt><i>device-name</i>\IsMuted</tt></b><br/>
			Gets or sets the mute setting of the TV (<tt>true</tt> or <tt>false</tt>).</li>

		<li><b><tt>Configuration\<i>device-name</i>\InputNames\<i>input-name</i></tt></b><br/>
			Gets the display label for input <i>input-name</i> of device <i>device-name</i>;
			currently the display label is the same as <i>input-name</i>.  This can be used to
			enumerate inputs.</li>

	</ul>

</div>
</div>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<div class="SectionHeader">
	AquosSimulator<a name="Sim"></a>
</div>
<div id="DocTopic">
<div class="Section">

	<p><b>AquosSimulator</b> is a HomeUX-compatible virtual serial port implementation that
	simulates a subset of the serial communication behavior Aquos hardware.  AquosSimulator
	performs no real-world actions&mdash;the simulation is purely for the purposes of testing a
	HomeUX installation without having to connect to real hardware.</p>

	<p>To use AquosSimulator in HomeUX, set the SerialPort attribute of the
	<a href="#Device">&lt;Device Driver="AquosDriver.dll"&gt;</a> configuration element to a string
	with the following format:</p>

	<code class="Indent">
          AquosSimulator.dll;;Test=<i>test-number</i>
	</code>

	<p>Parameters:</p>
	<ul>

		<li><p><i>test-number</i> specifies test behavior.  This is for development use only; use 0
			to specify normal behavior.  The default is 0.</p></li>

	</ul>

	<p>You can test AquosSimulator independently of HomeUX, using the VSerial console
	application:</p>

	<code class="Indent">
          VSerial.exe -cr -dll AquosSimulator.dll;;Test=<i>test-number</i>
	</code>

	<p>AquosSimulator implements a limited simulation&mdash;only the following hardware commands are
	currently supported.  (See Aquos hardware documentation for information about hardware commands
	and notifications.)</p>

	<p><b>Note</b>&nbsp; Below, a tilde (~) is used to represent one space character.</p>

	<ul>

 		<li><p>"RSPW0~~~": Disables the "Power Setting" command.</p></li>

 		<li><p>"RSPW1~~~": Enables the "Power Setting" command.</p></li>
		
 		<li><p>"POWR0~~~": Turns the TV off.</p></li>

 		<li><p>"POWR1~~~": Turns the TV on.</p></li>

 		<li><p>"IAVD<i>n</i>~~~": Switches to input <i>n</i> (1-9).</p></li>

 		<li><p>"VOLM<i>nn</i>~~": Sets the volume to <i>nn</i> (two digits, 00-60).</p></li>

 		<li><p>"MUTE<i>n</i>~~~": Turns mute on (<i>n</i>=1), off (<i>n</i>=2), or toggles it
			(<i>n</i>=0).</p></li>
		
	</ul>

</div>
</div>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<div class="TopicFooter">
</div>

<div class="PageFooter">
<p>See <a href="http://www.HomeUX.org">http://www.HomeUX.org</a> for more information about HomeUX.</p>
</div>

</body>

</html>

